<?php
/**
 * Created by PhpStorm.
 * User: fizz
 * Date: 2017/6/10
 * Time: 22:06
 */
define('ROOT_PATH', __DIR__);

require './vendor/autoload.php';

use Fizzday\Database\DB;

//$res = DB::query('select * from users where id>?', [1]);
//$res = DB::execute('insert into users(name, age) VALUES (?, ?)', [444, 444]);
//$res = DB::fields('a,b,c', ['e', 'a','d']);
$s = (microtime(true));
$res = DB::table('fd_test')
    ->where('id','=', 596)
//    ->where([['id', '>', 1], ['id', '=', 0]])
//    ->order('id' , 'asc')
//    ->order('name' , 'asc')
//    ->limit(10)
//    ->offset(10)
    ->count()
;
$e = (microtime(true));

echo number_format($e-$s, 3).PHP_EOL;

print_r($res);
